package com.eliza.kotlin.base.oop

import com.eliza.kotlin.base.BasicGrammar.l
import java.awt.SystemColor.info
import kotlin.reflect.KProperty


/*-*- coding:utf-8 -*-
 * @Author  : debi
 * @Time    : 6/4/22
 * @Software: IntelliJ IDEA
 */
fun interface InterFace {
    fun show(info: String)

}

class II : InterFace {
    override fun show(info: String) {
        println(info)
    }

}


class AA {
    fun show(l: InterFace) {
        l.show("AAA")
    }

    fun show2(function: (String) -> Unit) {
        function.invoke("sa")

    }

    fun show3(i: II) {}

    fun setOnClickListener(info: String, l: (String) -> Unit) {
        l.invoke(info)

    }

    fun show4(i: InterFace, function: (InterFace) -> Unit) {
        function.invoke(i)


    }
}